<template>
  <div>
    <el-container style='height: 100vh;'>
      <el-aside width='400px'/>
      <el-container style='height: 100%;'>
        <el-main>
          <div class="logo">
            <img src="../../assets/fengye.png" width="30">
            <h3>枫桪物语，记录美好生活！</h3>
          </div>

          <div class="loginPage">
            <h2>枫桪物语世界{{ logOrReg }}</h2>
            <div class="link">
              <router-link to="/login">登录</router-link>
              <router-link to="/register">注册</router-link>
            </div>
            <div class="viewRouter">
              <keep-alive>
                <router-view/>
              </keep-alive>
            </div>
          </div>
        </el-main>
        <el-footer height='10vh' style='display: flex;align-items: center;justify-content: center;'>
          <GlobalFooter/>
        </el-footer>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import GlobalFooter from '@/components/GlobalFooter'

export default {
  name: "LoginPage",
  components: {
    GlobalFooter
  },
  data() {
    return {
      logOrReg: '登录'
    }
  }
}
</script>

<style scoped>

@media screen and (max-width: 850px){
  >>> .el-aside{
    display: none;
  }
}
>>> .el-aside {
  background: url("./assets/login.jpg") no-repeat center/cover;
}

>>> .el-main{
  background-color: rgba(112, 175, 157, 0.3);
}

>>> .el-footer {
  background-color: rgba(112, 175, 157, 0.3);
}

>>> .logo {
  display: flex;
  align-items: center;
}

h3 {
  margin: 0;
  padding: 0;
  font-size: 30px;
  color: #52a47f;
  text-align: left;
  line-height: 1.5;
}

img {
  margin-right: 5px;
  vertical-align: middle;
}

div.loginPage {
  width: 360px;
  height: 500px;
  margin: 10vh auto 0;
}

h2{
  margin: 0;
  padding: 0;
  font-size: 36px;
  text-align:center;
}

div.link{
  display: flex;
  justify-content: center;
  margin:30px 0;
}

div.link span{
  margin: 0 10px;
}

div.link a{
  margin: 0 10px;
  text-decoration: none;
  text-align: center;
  font-size: 24px;
  line-height: 1.5;
  color: black;
  font-weight: 100;
}

div.link a:hover{
  color: #344f93;
}

div.link a.router-link-exact-active{
  font-weight: 700 !important;
  border-bottom: 4px solid #344f93;
  transition: .2s;
}


div.viewRouter{
  width: 100%;
  height: 200px;
}

</style>
